﻿@using WebEntities;
@using Tools.com.Pager;
@model PagedList<WI_LeaveMsg>
<div id="leaveMsgPage">
    @foreach (WI_LeaveMsg obj in Model)
    {
        <table border="0" cellpadding="0" cellspacing="0" width="100%" class="leaveMsgTable">
            <tr>
                <th class="asw">
                    @{ string conName = obj.ContactMan == null ? "匿名" : obj.ContactMan;}
                    @conName @obj.CreateTime.ToString("yyyy-MM-dd HH:mm") 提问：
                </th>
                <td>
                    关于“@obj.MsgSubject”问题：@obj.MsgBody
                </td>
            </tr>
            @if (obj.WI_LeaveMsgReply.FirstOrDefault() != null)
            {
                <tr>
                    <th class="asw">
                        网站 @obj.WI_LeaveMsgReply.FirstOrDefault().CreateTime.ToString("yyyy-MM-dd HH:mm")
                        回复：
                    </th>
                    <td class="red">
                        @obj.WI_LeaveMsgReply.FirstOrDefault().ReplyContent
                    </td>
                </tr>
            }
        </table>
    }
    @Html.AjaxPager(Model, new PagerOptions
{
    PageIndexParameterName = "page",
    CssClass = "mvc-pager",
    CurrentPagerItemWrapperFormatString = "<a  href='javascript:void(0)' class=\"mvc-paged\">{0}</a>",
    HorizontalAlign = "center"
}, new AjaxOptions { UpdateTargetId = "leaveMsgPage" })
</div>
